Add unified profiling feature gate config keys#11090
Open
Add unified profiling feature gate config keys#11090
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 12 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~8c097167db, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.062 s) : 0, 1061902
Total [baseline] (11.102 s) : 0, 11101674
Agent [candidate] (1.054 s) : 0, 1053604
Total [candidate] (11.123 s) : 0, 11123442
section appsec
Agent [baseline] (1.247 s) : 0, 1247243
Total [baseline] (11.213 s) : 0, 11213463
Agent [candidate] (1.248 s) : 0, 1247702
Total [candidate] (11.019 s) : 0, 11018837
section iast
Agent [baseline] (1.224 s) : 0, 1224160
Total [baseline] (11.329 s) : 0, 11328802
Agent [candidate] (1.223 s) : 0, 1223207
Total [candidate] (11.24 s) : 0, 11240116
section profiling
Agent [baseline] (1.183 s) : 0, 1182608
Total [baseline] (11.069 s) : 0, 11069321
Agent [candidate] (1.184 s) : 0, 1183839
Total [candidate] (11.05 s) : 0, 11050422
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~8c097167db, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.219 ms) : 0, 1219
crashtracking [candidate] (1.215 ms) : 0, 1215
BytebuddyAgent [baseline] (634.784 ms) : 0, 634784
BytebuddyAgent [candidate] (631.868 ms) : 0, 631868
AgentMeter [baseline] (29.519 ms) : 0, 29519
AgentMeter [candidate] (29.346 ms) : 0, 29346
GlobalTracer [baseline] (249.733 ms) : 0, 249733
GlobalTracer [candidate] (247.659 ms) : 0, 247659
AppSec [baseline] (32.197 ms) : 0, 32197
AppSec [candidate] (31.787 ms) : 0, 31787
Debugger [baseline] (60.4 ms) : 0, 60400
Debugger [candidate] (59.577 ms) : 0, 59577
Remote Config [baseline] (605.185 µs) : 0, 605
Remote Config [candidate] (590.15 µs) : 0, 590
Telemetry [baseline] (8.218 ms) : 0, 8218
Telemetry [candidate] (8.081 ms) : 0, 8081
Flare Poller [baseline] (9.139 ms) : 0, 9139
Flare Poller [candidate] (7.445 ms) : 0, 7445
section appsec
crashtracking [baseline] (1.223 ms) : 0, 1223
crashtracking [candidate] (1.216 ms) : 0, 1216
BytebuddyAgent [baseline] (660.874 ms) : 0, 660874
BytebuddyAgent [candidate] (661.811 ms) : 0, 661811
AgentMeter [baseline] (12.054 ms) : 0, 12054
AgentMeter [candidate] (12.095 ms) : 0, 12095
GlobalTracer [baseline] (248.919 ms) : 0, 248919
GlobalTracer [candidate] (248.757 ms) : 0, 248757
IAST [baseline] (24.56 ms) : 0, 24560
IAST [candidate] (24.569 ms) : 0, 24569
AppSec [baseline] (185.068 ms) : 0, 185068
AppSec [candidate] (184.282 ms) : 0, 184282
Debugger [baseline] (65.745 ms) : 0, 65745
Debugger [candidate] (65.851 ms) : 0, 65851
Remote Config [baseline] (605.362 µs) : 0, 605
Remote Config [candidate] (594.148 µs) : 0, 594
Telemetry [baseline] (8.442 ms) : 0, 8442
Telemetry [candidate] (8.565 ms) : 0, 8565
Flare Poller [baseline] (3.494 ms) : 0, 3494
Flare Poller [candidate] (3.583 ms) : 0, 3583
section iast
crashtracking [baseline] (1.217 ms) : 0, 1217
crashtracking [candidate] (1.224 ms) : 0, 1224
BytebuddyAgent [baseline] (801.014 ms) : 0, 801014
BytebuddyAgent [candidate] (800.734 ms) : 0, 800734
AgentMeter [baseline] (11.369 ms) : 0, 11369
AgentMeter [candidate] (11.355 ms) : 0, 11355
GlobalTracer [baseline] (239.299 ms) : 0, 239299
GlobalTracer [candidate] (238.656 ms) : 0, 238656
IAST [baseline] (25.82 ms) : 0, 25820
IAST [candidate] (25.745 ms) : 0, 25745
AppSec [baseline] (32.568 ms) : 0, 32568
AppSec [candidate] (30.254 ms) : 0, 30254
Debugger [baseline] (58.466 ms) : 0, 58466
Debugger [candidate] (62.73 ms) : 0, 62730
Remote Config [baseline] (542.68 µs) : 0, 543
Remote Config [candidate] (525.177 µs) : 0, 525
Telemetry [baseline] (14.004 ms) : 0, 14004
Telemetry [candidate] (12.218 ms) : 0, 12218
Flare Poller [baseline] (3.43 ms) : 0, 3430
Flare Poller [candidate] (3.634 ms) : 0, 3634
section profiling
crashtracking [baseline] (1.171 ms) : 0, 1171
crashtracking [candidate] (1.167 ms) : 0, 1167
BytebuddyAgent [baseline] (689.859 ms) : 0, 689859
BytebuddyAgent [candidate] (690.827 ms) : 0, 690827
AgentMeter [baseline] (9.084 ms) : 0, 9084
AgentMeter [candidate] (9.168 ms) : 0, 9168
GlobalTracer [baseline] (207.212 ms) : 0, 207212
GlobalTracer [candidate] (207.208 ms) : 0, 207208
AppSec [baseline] (32.515 ms) : 0, 32515
AppSec [candidate] (32.629 ms) : 0, 32629
Debugger [baseline] (65.696 ms) : 0, 65696
Debugger [candidate] (65.346 ms) : 0, 65346
Remote Config [baseline] (572.187 µs) : 0, 572
Remote Config [candidate] (574.174 µs) : 0, 574
Telemetry [baseline] (7.866 ms) : 0, 7866
Telemetry [candidate] (7.926 ms) : 0, 7926
Flare Poller [baseline] (3.612 ms) : 0, 3612
Flare Poller [candidate] (3.61 ms) : 0, 3610
ProfilingAgent [baseline] (93.808 ms) : 0, 93808
ProfilingAgent [candidate] (94.135 ms) : 0, 94135
Profiling [baseline] (94.363 ms) : 0, 94363
Profiling [candidate] (94.694 ms) : 0, 94694
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~8c097167db, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058019
Total [baseline] (8.84 s) : 0, 8839985
Agent [candidate] (1.058 s) : 0, 1058356
Total [candidate] (8.822 s) : 0, 8822059
section iast
Agent [baseline] (1.223 s) : 0, 1222597
Total [baseline] (9.533 s) : 0, 9533029
Agent [candidate] (1.223 s) : 0, 1223312
Total [candidate] (9.553 s) : 0, 9553052
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~8c097167db, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.255 ms) : 0, 1255
crashtracking [candidate] (1.236 ms) : 0, 1236
BytebuddyAgent [baseline] (632.233 ms) : 0, 632233
BytebuddyAgent [candidate] (634.073 ms) : 0, 634073
AgentMeter [baseline] (29.664 ms) : 0, 29664
AgentMeter [candidate] (29.429 ms) : 0, 29429
GlobalTracer [baseline] (249.979 ms) : 0, 249979
GlobalTracer [candidate] (248.899 ms) : 0, 248899
AppSec [baseline] (32.295 ms) : 0, 32295
AppSec [candidate] (32.113 ms) : 0, 32113
Debugger [baseline] (59.547 ms) : 0, 59547
Debugger [candidate] (59.412 ms) : 0, 59412
Remote Config [baseline] (599.948 µs) : 0, 600
Remote Config [candidate] (613.47 µs) : 0, 613
Telemetry [baseline] (8.144 ms) : 0, 8144
Telemetry [candidate] (8.142 ms) : 0, 8142
Flare Poller [baseline] (8.225 ms) : 0, 8225
Flare Poller [candidate] (8.391 ms) : 0, 8391
section iast
crashtracking [baseline] (1.219 ms) : 0, 1219
crashtracking [candidate] (1.219 ms) : 0, 1219
BytebuddyAgent [baseline] (800.994 ms) : 0, 800994
BytebuddyAgent [candidate] (801.776 ms) : 0, 801776
AgentMeter [baseline] (11.351 ms) : 0, 11351
AgentMeter [candidate] (11.379 ms) : 0, 11379
GlobalTracer [baseline] (238.454 ms) : 0, 238454
GlobalTracer [candidate] (238.824 ms) : 0, 238824
IAST [baseline] (25.826 ms) : 0, 25826
IAST [candidate] (26.561 ms) : 0, 26561
AppSec [baseline] (32.598 ms) : 0, 32598
AppSec [candidate] (30.248 ms) : 0, 30248
Debugger [baseline] (58.516 ms) : 0, 58516
Debugger [candidate] (59.818 ms) : 0, 59818
Remote Config [baseline] (527.356 µs) : 0, 527
Remote Config [candidate] (517.288 µs) : 0, 517
Telemetry [baseline] (13.194 ms) : 0, 13194
Telemetry [candidate] (13.04 ms) : 0, 13040
Flare Poller [baseline] (3.565 ms) : 0, 3565
Flare Poller [candidate] (3.551 ms) : 0, 3551
LoadParameters
See matching parameters
SummaryFound 4 performance improvements and 0 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~8c097167db, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section baseline
no_agent (18.413 ms) : 18221, 18605
. : milestone, 18413,
appsec (18.731 ms) : 18543, 18919
. : milestone, 18731,
code_origins (18.011 ms) : 17835, 18187
. : milestone, 18011,
iast (17.772 ms) : 17596, 17947
. : milestone, 17772,
profiling (19.37 ms) : 19173, 19566
. : milestone, 19370,
tracing (17.728 ms) : 17550, 17905
. : milestone, 17728,
section candidate
no_agent (16.889 ms) : 16725, 17053
. : milestone, 16889,
appsec (18.545 ms) : 18360, 18730
. : milestone, 18545,
code_origins (17.696 ms) : 17522, 17871
. : milestone, 17696,
iast (17.726 ms) : 17554, 17898
. : milestone, 17726,
profiling (19.16 ms) : 18971, 19349
. : milestone, 19160,
tracing (17.865 ms) : 17688, 18042
. : milestone, 17865,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~8c097167db, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section baseline
no_agent (1.26 ms) : 1246, 1274
. : milestone, 1260,
iast (3.357 ms) : 3310, 3405
. : milestone, 3357,
iast_FULL (6.073 ms) : 6011, 6135
. : milestone, 6073,
iast_GLOBAL (3.651 ms) : 3596, 3705
. : milestone, 3651,
profiling (2.303 ms) : 2281, 2325
. : milestone, 2303,
tracing (1.848 ms) : 1832, 1863
. : milestone, 1848,
section candidate
no_agent (1.275 ms) : 1262, 1287
. : milestone, 1275,
iast (3.121 ms) : 3079, 3163
. : milestone, 3121,
iast_FULL (5.858 ms) : 5800, 5917
. : milestone, 5858,
iast_GLOBAL (3.467 ms) : 3415, 3519
. : milestone, 3467,
profiling (2.2 ms) : 2179, 2221
. : milestone, 2200,
tracing (1.881 ms) : 1866, 1897
. : milestone, 1881,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~8c097167db, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section baseline
no_agent (15.071 s) : 15071000, 15071000
. : milestone, 15071000,
appsec (14.959 s) : 14959000, 14959000
. : milestone, 14959000,
iast (17.977 s) : 17977000, 17977000
. : milestone, 17977000,
iast_GLOBAL (17.874 s) : 17874000, 17874000
. : milestone, 17874000,
profiling (14.709 s) : 14709000, 14709000
. : milestone, 14709000,
tracing (14.99 s) : 14990000, 14990000
. : milestone, 14990000,
section candidate
no_agent (15.605 s) : 15605000, 15605000
. : milestone, 15605000,
appsec (14.781 s) : 14781000, 14781000
. : milestone, 14781000,
iast (18.383 s) : 18383000, 18383000
. : milestone, 18383000,
iast_GLOBAL (18.1 s) : 18100000, 18100000
. : milestone, 18100000,
profiling (15.003 s) : 15003000, 15003000
. : milestone, 15003000,
tracing (14.84 s) : 14840000, 14840000
. : milestone, 14840000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~8c097167db, baseline=1.62.0-SNAPSHOT~9f89a0b26cc
dateFormat X
axisFormat %s
section baseline
no_agent (1.489 ms) : 1477, 1501
. : milestone, 1489,
appsec (3.824 ms) : 3602, 4045
. : milestone, 3824,
iast (2.27 ms) : 2201, 2338
. : milestone, 2270,
iast_GLOBAL (2.32 ms) : 2251, 2389
. : milestone, 2320,
profiling (2.09 ms) : 2035, 2144
. : milestone, 2090,
tracing (2.075 ms) : 2022, 2128
. : milestone, 2075,
section candidate
no_agent (1.493 ms) : 1482, 1505
. : milestone, 1493,
appsec (3.833 ms) : 3611, 4055
. : milestone, 3833,
iast (2.275 ms) : 2206, 2344
. : milestone, 2275,
iast_GLOBAL (2.316 ms) : 2247, 2386
. : milestone, 2316,
profiling (2.103 ms) : 2048, 2157
. : milestone, 2103,
tracing (2.079 ms) : 2025, 2132
. : milestone, 2079,
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Deprecate misleading PROFILING_ALLOCATION_ENABLED_DEFAULT constant - Update PROFILING_HEAP_ENABLED_DEFAULT javadoc to explain dynamic default - Fix PROFILING_DIRECT_ALLOCATION_ENABLED missing @deprecated javadoc - Drop JavaMonitorWait/ThreadPark/ThreadSleep from wall gate (timeline events) - Add startup-only/no-RC comment to feature gate block in OpenJdkController - Add BiasedLock noop comment for JDK 18+ awareness - Add lock sampler note to DatadogProfilerConfig - Extract DirectMemoryProfilingHelper shared utility - Add gate tests: CPU, exception, I/O, lock, thread, wall-timeline - Set metadata defaults to false (safe fallback for dynamic defaults) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a020726 to
d19b09b
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Adds unified
profiling.<feature>.enabledconfiguration keys for all GA profiling features, following the pattern established byprofiling.heap.enabled:profiling.cpu.enabled(default:true) — gates CPU profiling for both JFR (jdk.ExecutionSample,jdk.NativeMethodSample,jdk.CPUTimeSample) and ddprofprofiling.walltime.enabled(default:true) — gates wall-clock profiling for ddprof (JFR timeline events are intentionally excluded — they serve queueing-time and blocking-event purposes beyond wall-clock profiling)profiling.exception.enabled(default:true) — gates JFR exception profiling (datadog.ExceptionSample,datadog.ExceptionCount)profiling.io.enabled(default:true) — gates JFR I/O profiling (jdk.FileRead/Write/Force,jdk.SocketRead/Write)profiling.lock.enabled(default:true) — gates JFR lock profiling (jdk.JavaMonitorEnter,jdk.BiasedLock*)profiling.thread.enabled(default:true) — gates JFR thread lifecycle profiling (jdk.ThreadStart/End)profiling.direct.memory.enabled(default:false) — unified replacement for deprecatedprofiling.directallocation.enabled; old key still works as fallbackAlso:
PROFILING_ALLOCATION_ENABLED_DEFAULT = trueconstant (was dynamic-only before)DD_PROFILING_HEAP_ENABLEDandDD_PROFILING_ALLOCATION_ENABLEDmetadata defaults to"true"PROFILING_HEAP_ENABLED_DEFAULT(dynamic default) andPROFILING_DIRECT_ALLOCATION_ENABLEDconstants=== Feature Gates ===section to profiler flare reportMotivation
PROF-10633 — Revisit and unify profiling settings.
Users had no consistent, feature-level way to disable individual profiling modes without reaching into backend-specific knobs (
profiling.ddprof.cpu.enabled,profiling.ddprof.wall.enabled, etc.). The new unified keys provide a single toggle per feature that applies to both JFR and ddprof backends.Configuration Design
Two-tier gate hierarchy
Each profiling feature is gated at two levels. The unified key is checked first; if it passes, backend-specific keys apply their own inner overrides.
flowchart TD PROF["dd.profiling.enabled = true"] PROF --> CPU PROF --> WALL PROF --> EXC PROF --> IO PROF --> LOCK PROF --> THR PROF --> DM subgraph CPU["profiling.cpu.enabled - default: true"] CPU_JFR["JFR: ExecutionSample, NativeMethodSample,<br>CPUTimeSample, CPUTimeSamplesLost"] CPU_DDPROF["ddprof: profiling.ddprof.cpu.enabled"] end subgraph WALL["profiling.walltime.enabled - default: true"] WALL_DDPROF["ddprof: profiling.ddprof.wall.enabled"] WALL_NOTE["Note: JFR timeline events are NOT gated here -<br>they serve queueing-time purposes independently"] end subgraph EXC["profiling.exception.enabled - default: true"] EXC_JFR["JFR: ExceptionSample, ExceptionCount"] end subgraph IO["profiling.io.enabled - default: true"] IO_JFR["JFR: FileRead, FileWrite, FileForce,<br>SocketRead, SocketWrite"] end subgraph LOCK["profiling.lock.enabled - default: true"] LOCK_JFR["JFR: JavaMonitorEnter, BiasedLock"] end subgraph THR["profiling.thread.enabled - default: true"] THR_JFR["JFR: ThreadStart, ThreadEnd"] end subgraph DM["profiling.direct.memory.enabled - default: false"] DM_INST["ByteBuffer.allocateDirect,<br>DirectByteBuffer ctor,<br>FileChannelImpl.map"] endConfig resolution for
dd.profiling.direct.memory.enabledThis key replaces the deprecated
dd.profiling.directallocation.enabled. The old key is honoured as an alias so existing deployments are unaffected.Additional Notes
trueso existing deployments are unaffectedprofiling.direct.memory.enableddefaults tofalseto preserve backward compatibility withprofiling.directallocation.enabledprofiling.ddprof.cpu.enabled, etc.) remain as inner overrides for advanced useContributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: PROF-10633
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.